package com.isoft.systemprovidor.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.isoft.systemprovidor.bean.ResponseData;
import com.isoft.systemprovidor.entity.MyApproval;
import com.isoft.systemprovidor.entity.PhoneBook;
import com.isoft.systemprovidor.service.MyApprovalService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
@Slf4j
@RequestMapping("/systemprovidor/myapproval")
public class MyApprovalController extends BaseController{
    @Autowired
    MyApprovalService myApprovalService;

    /*分页获取分页我的审核数据*/
    @GetMapping("/getallmyapproval")
    public Page<MyApproval> getallMyApprovalaPage(Integer current , Integer size ,String sysuserid){
        return myApprovalService.getallMyApprovalaPage(current , size ,sysuserid);
    }

    /*查询我的审核的未读*/
    @GetMapping("/unread")
    public ResponseData<Object> UnreadNum(String sysuserid){
        return returnObject(myApprovalService.UnreadNum(sysuserid));
    }
}
